function deSelectAll(treeId, ids) {
    var treeObj = $.fn.zTree.getZTreeObj(treeId);
    console.log(ids);
    for (var i = 0; i < ids.length; i++) {
        treeObj.checkNode(treeObj.getNodeByParam("id", ids[i]), true);
    }
}

function getSelectedNodes(treeId) {
    var treeObj = $.fn.zTree.getZTreeObj(treeId);
    var nodes = treeObj.getCheckedNodes(true);
    var ids = [];
    for (var i = 0; i < nodes.length; i++) {
        if (!nodes[i].isParent) {
            ids.push(nodes[i].id);
        }
    }
    return ids;
}